package com.example.jinzproduct.server.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.plugins.Page;
import com.example.commons.entity.ExaminationResultsDO;
import com.example.jinzproduct.dao.ExaminationResultsDao;
import com.example.jinzproduct.entity.vo.ExaminationResultVo;
import com.example.jinzproduct.entity.vo.MyResultsVo;
import com.example.jinzproduct.server.ExaminationResultsService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 
 * <pre>
 * 考试   成绩
 * </pre>
 * <small> 2020-02-24 21:00:12 | lance</small>
 */
@Service
public class ExaminationResultsServiceImpl extends ServiceImpl<ExaminationResultsDao, ExaminationResultsDO> implements ExaminationResultsService {

    @Override
    public Page<MyResultsVo> selByUserId(Map map, int current, int number) {

        // 新建分页
        Page<MyResultsVo> page = new Page<MyResultsVo>(current, number);

        return page.setRecords(this.baseMapper.selByUserId(page,map));
    }

    @Override
    public Page<ExaminationResultsDO> findLists(Map map,int current , int number) {
        Page<ExaminationResultsDO> page = new Page<ExaminationResultsDO>(current, number);

        return page.setRecords(this.baseMapper.findLists(page,map));
    }

    @Override
    public Page<ExaminationResultsDO> findPageList(Map map, int current, int number) {

        Page<ExaminationResultsDO> page = new Page<ExaminationResultsDO>(current, number);

        return page.setRecords(this.baseMapper.findPageList(page,map));
    }

    @Override
    public Page<ExaminationResultsDO> findList(Map map, int current, int number) {

        Page<ExaminationResultsDO> page = new Page<ExaminationResultsDO>(current, number);

        return page.setRecords(this.baseMapper.findList(page,map));
    }

    @Override
    public List<ExaminationResultVo> selectByStu(Map map){
        return this.baseMapper.selectByStu(map);
    }

    @Override
    public Page<ExaminationResultsDO> findPageListType(Map map, int current, int number) {

        Page<ExaminationResultsDO> page = new Page<ExaminationResultsDO>(current, number);

        return page.setRecords(this.baseMapper.findPageListType(page,map));
    }

    @Override
    public Page<ExaminationResultsDO> findPageListType2(Map map, int current, int number) {

        Page<ExaminationResultsDO> page = new Page<ExaminationResultsDO>(current, number);

        return page.setRecords(this.baseMapper.findPageListType2(page,map));
    }

}
